home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Programming / AmigaE / Src / Afc / Rexxer_Sender.e < prev    next >
Encoding:
Text File  |  1997-09-07  |  714 b   |  36 lines

  1. /*
  2.  
  3.    $VER: Rexxer Sender Example 1.0
  4.  
  5.    Written By Fabio Rotondo
  6.  
  7.    (C)Copyright Amiga Foundation Classes
  8.  
  9.    NOTES: Run this program AFTER you have run 'Rexxer Receiver'.
  10.  
  11.           This program will communicate using ARexx with 'RECEIVE.1'.
  12.           If the "RECEIVE.1" port is not found, the program will raise
  13.           an exception.
  14.  
  15. */
  16.  
  17. MODULE 'afc/rexxer', 'afc/explain_exception'
  18.  
  19. PROC main() HANDLE
  20.   DEF rx=NIL:PTR TO rexxer
  21.  
  22.  
  23.   IF FindPort('RECEIVE.1')=NIL THEN Raise("recv")
  24.   NEW rx.rexxer('SENDER')
  25.  
  26.   rx.send('RECEIVE.1', 'QUIT')
  27.  
  28.   WriteF('RC:\d - Result:\s\n', rx.rc(), rx.result())
  29.   WriteF('ARexx Sender port terminating...\n')
  30. EXCEPT DO
  31.   explain_exception()
  32.   END rx
  33.   CleanUp(0)
  34. ENDPROC
  35.  
  36.